<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<script>
    var totalMoney=0.0;//预交金总额
    $(function(){
        var settledIndicator =  '${patVisit.settledIndicator}';
        if(settledIndicator=='1'){
            toastr.warning("该病人已经结算完成");
            return false;
        }

        $('#name').val('${patVisit.patVisitIndex.name}');
        $("#hospCount").val('${patVisit.zhuyuanTians}');
        $("#chargeType").val('${fns:getDictLabels(patVisit.patVisitIndex.chargeType,'CHARGE_TYPE_DICT','')}');
        $("#admissionDate").val('<fmt:formatDate value="${patVisit.admissionDate}" pattern="yyyy-MM-dd"></fmt:formatDate>');
        $("#deptAdmissionTo").val('${fns:getDeptName(patVisit.deptAdmissionTo,'')}');
        $("#enterDeptDate").val('${fns:getDeptName(patVisit.deptStayed,'')}');
        $("#dischargeDate").val('<fmt:formatDate value="${patVisit.dischargeDate}" pattern="yyyy-MM-dd"></fmt:formatDate>');

        //预交金计算
        $("input[name=amount]").each(function(){
            var money =$(this).val();
            totalMoney += Number(money);
        });
    })
</script>
<form  method="post" class="form-horizontal">
        <div class="form-group">
            <label class="col-sm-3 control-label" for="prepayment">总预交金：</label>
            <div class="col-sm-3">
                <input type="text" class="form-control" id="prepayment" value="${patPrepayments.money}" name="amount">
            </div>
        </div>
</form>